# -*- coding: utf-8 -*-
"""
Created on Wed Oct 09 15:19:23 2013

@author: jkwong
"""

#PBAR_ConsolidateData.py


cargoDir= r'\\sundfs01.osient.com\Sunnyvale_Dept\common\PROJECTS\PBAR(ISNAR)\PBAR Data\Backup\Backup mirror\PBARDATA'
zspecDir = r'\\sundfs01.osient.com\Sunnyvale_Dept\common\PROJECTS\PBAR(ISNAR)\PBAR Data\ZspecNpy'

destinationDir = r'C:\Users\jkwong\Documents\Work\PBAR\data3\BasicScans'

#read in the csv file containing the dataset information
temp = np.genfromtxt(r'C:\Users\jkwong\Documents\Work\PBAR\cargoimagedata.txt', delimiter = '\t', skip_header = 1, dtype = '|S30')

# remove direct scan lines
dat = []
cargoIndices = temp[:,0].astype(int)
for i in xrange(temp.shape[0]):
    if temp[i,2] == 'Basic':
        dat.append(temp[i,:])

letters = ['A', 'B', 'C', 'D', 'E']

for i in xrange(1,41):
    # make short list of those matching cargo index
    dat2 = []
    for (ii, d) in enumerate(dat):
        if int(d[0]) == i:
            dat2.append(d)
    for (ii, d) in enumerate(dat):
        zspecNumberString = d[3]
        cargoString = d[4]
        # create file names
        zspecFile = os.path.join(zspecDir, zspecNumberString, )
        # copy the cargo files
    
        # copy the zspec files
    
    
        
    
    